<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<c:set value="recruit" var="moduleName" scope="request" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>申请确认</title>
		<script src="<c:url value="/js/jquery-1.4.4.js" />" type="text/javascript"></script>
	</head>
	<body>
	<div class="div-content">
		<jsp:include page="common-apply-view.jsp" />
		<dict:dict type="yesOrNo" var="yesOrNo" />
		<div class="site-title">
			申请确认
		</div>
		<html:form action="/console/recruit/applyConfirmEx.do" styleId="applyConfirmForm" method="POST">
			<input type="hidden" name="method" class="method" value="save" />
			<html:hidden property="id" />
			<html:hidden property="applyBaseId" />
			<table class="table-layout">
				<tr class="tr-odd">
					<td class="td-label">
						是否确认申请<span class="required">*</span>
					</td>
					<td>
						<logic:iterate name="yesOrNo" id="entry">
							<html-el:radio property="typeCode" value="${entry.code}">
								<c:out value="${entry.name}" />
							</html-el:radio>
						</logic:iterate>
					</td>
				</tr>
				<tr class="tr-even">
					<td class="td-label">
						备注
					</td>
					<td>
						<html:textarea property="notes" style="width:100%;" />
					</td>
				</tr>
			</table>
			<br />
			<div class="center-opertion">
				<logic:iterate id="region" name="apply" property="region">
					<c:if test="${region.status == 1 && region.serial == 2}">
						<input type="button" value="拆分" onclick="if(confirm('该操作不可恢复，确定要将该申请拆分吗？'))location.href='<c:url value="/console/recruit/applyConfirmEx.do?method=split" />&applyBaseId=<c:out value="${apply.id}" />'" />
					</c:if>
				</logic:iterate>
				<input type="button" value="提交" onclick="validate();" />
				<input type="button" onclick="history.back();" value="取消" />
			</div>
		</html:form>
	</div>
		<script>
function validate(){
	var f = _g("applyConfirmForm");
	var t = $("input[type='radio'][name='typeCode']:checked");
	if(t.length < 1) return alert("请选择是否确认");
	if(t.val() == "0" && f.notes.value.length < 1){
		return alert("请填写备注");
	}
	f.submit();
}
</script>
	</body>
</html>
